package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/14 14:39
 * 邮箱：648859026@qq.com
 */
public class GuideUnLikeAction extends AHttpService<PbBean.PbResGuideUnLike>{
    /**
     * 搭配指导取消点赞
     * @param context
     * @param id 指导ID
     * @return
     */
    public static GuideUnLikeAction newInstance(Context context, int id){
        return new GuideUnLikeAction(context, id);
    }
    private int id;
    private GuideUnLikeAction(Context context, int id) {
        super(context);
        this.id = id;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqGuideUnLike.Builder builder = PbBean.PbReqGuideUnLike.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setId(id);

        return apiService.guideUnLike(builder.build());
    }
}
